{% extends "bbase.html" %}

{% block content %}
    <div class="main">

        <!-- Posts  -->
        <ul>
            {% for poste in posts.object_list %}
                <div class="title">{{ poste.titre }}</div>
                <ul>
                    <div class="time">{{ poste.date }}</div>
                    <div class="body">{{ post.texte|linebreaks }}</div>
                </ul>
            {% endfor %}
        </ul>

        <!-- Next/Prev page links  -->
        {% if posts.object_list and posts.paginator.num_pages > 1 %}
        <div class="pagination" style="margin-top: 20px; margin-left: -20px; ">
            <span class="step-links">
                {% if posts.has_previous %}
                    <a href= "?page={{ posts.previous_page_number }}">newer entries &lt;&lt; </a>
                {% endif %}

                <span class="current">
                    &nbsp;Page {{ posts.number }} of {{ posts.paginator.num_pages }}
                </span>

                {% if posts.has_next %}
                    <a href="?page={{ posts.next_page_number }}"> &gt;&gt; older entries</a>
                {% endif %}
            </span>
        </div>
        {% endif %}

    </div>

{% endblock %}